<!DOCTYPE html>
<html lang="ru">
<head><meta charset="utf-8"></head>

<body>
<p><input id="str" placeholder="Строка"></p>
<p><input id="nnc" value="0"></p>
<p><input id="dur" value="0 ms"></p>
<p><button type="button" onclick="goPow()">Go!</button></p>

<script src="pow16.js"></script>
<script>"use strict";
const goPow = () => {
   let str = document.querySelector("#str").value;
   let tm = (new Date()).getTime();
   let res = pow16(str);
   let dur = (new Date()).getTime() - tm;
   document.querySelector("#nnc").value = res;
   document.querySelector("#dur").value = dur + " ms";   
}
</script>
</body>
</html>
